<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <h1>=======></h1>
    <hr>
    <div id="app">
        <p>{{msg}}</p>
    </div>
    <hr>
    <h1><=======</h1>
    <template id="adc">
        <div name="hahaah">
            <h2>{{msg}}</h2>
            <input type="button" value="事件" @click="print()">
        </div>
    </template>
    <template>
        <div>
            <h2>{{msg}}</h2>
            <input type="button" value="事件" @click="print()">
        </div>
    </template>
</body>
<script>
    var vm=new Vue({
        el:"#app",
        // template:`<p @click="print()">{{msg}}</p>`,
        template:"#adc",
        data:{
            msg:"初始变量"
        },
        methods:{
            print(){
                console.log("template为页面实例提供模板");
            }
        }
    })
</script>
</html>